using MidnightPeach.Engine.Packages;
using MidnightPeach.Engine.Schema;
using MidnightPeach.Engine.Schema.ServiceSchema;

namespace MidnightPeach.Engine.Generators.ServiceGenerators
{
    class AssemblyGenerator : ServiceGenerator
    {
        public AssemblyGenerator(Package package, Assembly assembly) : base(package)
        {
            Assembly = assembly;
        }

        public Assembly Assembly { get; private set; }

        internal override string Generate(Macro macro, string text)
        {
            switch (macro.Value)
            {
                case "PascalName":
                    return Assembly.PascalName;

                case "CamelName":
                    return Assembly.CamelName;

                default:
                    throw new UnsupportedMacroException(macro, text, this);
            }

        }
    }
}
